﻿using System;
using System.Runtime.Serialization;
using System.Xml.Serialization;

namespace Interscape.TwilioClient
{
    /// <summary>
    /// The TwilioRestError object represents the response the TwilioAPI sends when a request encounters an error.
    /// </summary>
    [Serializable]
    [XmlRoot("RestException")]
    public class TwilioRestError
    {

        /// <summary>
        /// Corresponds to the HTTP Status code returned.
        /// </summary>
        [XmlElement]
        public string Message { get; set; }

        /// <summary>
        /// Corresponds to the HTTP Status code returned.
        /// </summary>
        [XmlElement]
        public string Status { get; set; }

        /// <summary>
        /// (Conditional) An error code that can be used to find help for the error you received.
        /// </summary>
        [XmlElement]
        public string Code { get; set; }

        /// <summary>
        /// (Conditional) The URL of Twilio's documentation for the error code.
        /// </summary>
        [XmlElement]
        public string MoreInfo { get; set; }


    }
}
